////////////////////////////////////////////////////////////////////////////////
// Copyright 2007 CORE Solutions Limited
// All rights reserved.
// PROPRIETARY AND CONFIDENTIAL INFORMATION.
// Use is subject to license terms.
//
// FUNCTION ID      :   CATALOG_SECURITY
// AUTHOR           :   Saint Peng 
// DATE CREATE      :   2007/03/29
// DESCRIPTION      :   a MAINTENANCE FORM file for the function, CATALOG_SECURITY
//                  :   
//                  :   
//                  :   
//
// MODIFICATION HISTORY:
// DATE         AUTHOR          VERSION NO.         COMMENT
// -----------  --------------  ------------------  -------------------
// 2007/03/29   Saint Peng      1.0                 source is generated.
//
//
//
////////////////////////////////////////////////////////////////////////////////

package com.erp.app.catalog.catalogSecurity.web;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

import com.erp.framework.controller.form.SimpleMaintStyleForm;
import com.erp.app.util.web.ActionErrorUtil;
import com.erp.framework.util.CommonUtil;
import com.erp.framework.util.logger.Logger;

/**
* <p>A <strong>MaintenanceForm</strong> is a JavaBean which provides property
* getter and setter methods for all of the bean properties, and implements
* <code>Serializable</code>, as required by the JavaBean specification
* The main purpose for this bean is to get the user input
* from the web browsers.
*
* @author          Saint Peng 
* @version 1.0     2007/03/29
* @since           FrameWork 1.0
*
*/
public class CatalogSecurityMaintenanceForm extends SimpleMaintStyleForm {

	//Header Attributes (DB Table Name: T_CATALOG_SECURITY_HDR)
	private String companyCode;                      //DB Column Name: COMPANY_CODE
	private String userCode;                         //DB Column Name: USER_CODE
	private String hdrUserId;                        //DB Column Name: USER_ID
	private String hdrUserName;                      //DB Column Name: USER_NAME
	private String hdrUserGroupCode;                 //DB Column Name: USER_GROUP_CODE
	private String hdrCatalogUserId;                 //DB Column Name: CATALOG_USER_ID
	private String hdrLoginParty;
	private String hdrRoleGroupId;


	//Child Attributes (DB Table Name: T_CATALOG_SECURITY_DTL)
	public String[] dtlNodeId;

	//Other Attributes

	private String[] dtlCatalogTree;
	private String[] dtlCatalogName;
	private String[] dtlCatalogLevel;


	private String[] fieldDtlId;
	private String[] fieldNodeId;

	//Other Attributes

	private String[] fieldItemDetailName;
	private String[] fieldItemDetailType;
	private String[] fieldCatalogName;
	




	private CatalogSecurityCommonValidator validator = new CatalogSecurityCommonValidator();

	/**
	* Validate the properties that have been set for this non-HTTP request,
	* and return an <code>ActionErrors</code> object that encapsulates any
	* validation errors that have been found.  If no errors are found, return
	* <code>null</code> or an <code>ActionErrors</code> object with no
	* recorded error messages.
	* <p>
	* The default implementation attempts to forward to the HTTP version of
	* this method.
	*
	* @param      the action errors array
	* @author     Saint Peng 
	* @since      Framework 1.0
	*/
	public void otherValidate(ActionErrors errors) {

		validator.validateSave(errors, this);
	}

	/**
	* Validate the properties that have been set for this non-HTTP request,
	* and return an <code>ActionErrors</code> object that encapsulates any
	* validation errors that have been found.  If no errors are found, return
	* <code>null</code> or an <code>ActionErrors</code> object with no
	* recorded error messages.
	* <p>
	* The default implementation attempts to forward to the HTTP version of
	* this method.
	*
	* @param      mapping      the action mapping
	* @param      formIn       the action form
	* @param      request      the http request
	* @param      response     the http response
	* @param      errors       the action errors array
	* @author     Saint Peng 
	* @since      Framework 1.0
	*/
	public void moreValidate(ActionMapping mapping, ActionForm formIn,
		HttpServletRequest request, HttpServletResponse response, ActionErrors errors) {

		validator.moreValidateSave(mapping, formIn, request, response, errors);
	}

	/**
	* Reset all bean properties to their default state.  This method
	* is called inside the reset() method.
	*
	* @param      mapping The mapping used to select this instance
	* @param      request The servlet request we are processing
	* @author     Saint Peng 
	* @since      Framework 1.0
	*/
	public void otherReset(ActionMapping mapping, HttpServletRequest request) {
		
	}

	/**
	* Converts to a string representing the data in this object.
	* A new <code>String</code> object is allocated and initialized to 
	* contain the character sequence currently represented by this 
	* object. This <code>String</code> is then returned. Subsequent 
	* changes to this object do not affect the contents of the 
	* <code>String</code>. 
	*
	* @return     a string representation of the object.
	* @see        java.lang.Object#toString()
	* @author     Saint Peng 
	* @since      Framework 1.0
	*/
	public String toString() {
		String pkStr = "PK: {companyCode = " + this.companyCode
			+ "\n, userCode = " + this.userCode + "}\n";
		String colStr = "COL: {hdrUserId = " + this.hdrUserId
			+ "\n, hdrUserName = " + this.hdrUserName
			+ "\n, hdrUserGroupCode = " + this.hdrUserGroupCode
			+ "\n, hdrCatalogUserId = " + this.hdrCatalogUserId + "}\n";
		return "CatalogSecurityMaintenanceForm.toString() (header only) is:\n" + pkStr + colStr;
	}

	////////////////////////////////////////////////////////////////////////////////
	//Generated Accessors (get/set methods) for Header (CatalogSecurityHdr)
	////////////////////////////////////////////////////////////////////////////////

	public String getCompanyCode() {
		return this.companyCode;
	}

	public String getUserCode() {
		return this.userCode;
	}

	public String getHdrUserId() {
		return this.hdrUserId;
	}

	public String getHdrUserName() {
		return this.hdrUserName;
	}

	public String getHdrUserGroupCode() {
		return this.hdrUserGroupCode;
	}

	public String getHdrCatalogUserId() {
		return this.hdrCatalogUserId;
	}

	public void setCompanyCode(String companyCode) {
		this.companyCode = companyCode;
	}

	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}

	public void setHdrUserId(String hdrUserId) {
		this.hdrUserId = hdrUserId;
	}

	public void setHdrUserName(String hdrUserName) {
		this.hdrUserName = hdrUserName;
	}

	public void setHdrUserGroupCode(String hdrUserGroupCode) {
		this.hdrUserGroupCode = hdrUserGroupCode;
	}

	public void setHdrCatalogUserId(String hdrCatalogUserId) {
		this.hdrCatalogUserId = hdrCatalogUserId;
	}

	////////////////////////////////////////////////////////////////////////////////
	//Generated Accessors (get/set methods) for Child (CatalogSecurityDtl)
	////////////////////////////////////////////////////////////////////////////////

	

	
	////////////////////////////////////////////////////////////////////////////////
	//Generated Accessors (get/set methods) for Child (CatalogSecurityField)
	////////////////////////////////////////////////////////////////////////////////

	

	

	////////////////////////////////////////////////////////////////////////////////
	//Generated Accessors (get/set methods) for Child (CatalogSecurityLightbox)
	////////////////////////////////////////////////////////////////////////////////

	


	

	public String[] getDtlNodeId() {
		return dtlNodeId;
	}

	public void setDtlNodeId(String[] dtlNodeId) {
		this.dtlNodeId = dtlNodeId;
	}

	

	public String getHdrLoginParty() {
		return hdrLoginParty;
	}

	public void setHdrLoginParty(String hdrLoginParty) {
		this.hdrLoginParty = hdrLoginParty;
	}

	public String getHdrRoleGroupId() {
		return hdrRoleGroupId;
	}

	public void setHdrRoleGroupId(String hdrRoleGroupId) {
		this.hdrRoleGroupId = hdrRoleGroupId;
	}

	public String[] getDtlCatalogName() {
		return dtlCatalogName;
	}

	public void setDtlCatalogName(String[] dtlCatalogName) {
		this.dtlCatalogName = dtlCatalogName;
	}

	public String[] getDtlCatalogTree() {
		return dtlCatalogTree;
	}

	public void setDtlCatalogTree(String[] dtlCatalogTree) {
		this.dtlCatalogTree = dtlCatalogTree;
	}

	

	public String[] getDtlCatalogLevel() {
		return dtlCatalogLevel;
	}

	public void setDtlCatalogLevel(String[] dtlCatalogLevel) {
		this.dtlCatalogLevel = dtlCatalogLevel;
	}

	public String[] getFieldCatalogName() {
		return fieldCatalogName;
	}

	public void setFieldCatalogName(String[] fieldCatalogName) {
		this.fieldCatalogName = fieldCatalogName;
	}

	public String[] getFieldItemDetailName() {
		return fieldItemDetailName;
	}

	public void setFieldItemDetailName(String[] fieldItemDetailName) {
		this.fieldItemDetailName = fieldItemDetailName;
	}

	public String[] getFieldItemDetailType() {
		return fieldItemDetailType;
	}

	public void setFieldItemDetailType(String[] fieldItemDetailType) {
		this.fieldItemDetailType = fieldItemDetailType;
	}

	

	public String[] getFieldDtlId() {
		return fieldDtlId;
	}

	public void setFieldDtlId(String[] fieldDtlId) {
		this.fieldDtlId = fieldDtlId;
	}

	public String[] getFieldNodeId() {
		return fieldNodeId;
	}

	public void setFieldNodeId(String[] fieldNodeId) {
		this.fieldNodeId = fieldNodeId;
	}

	

	////////////////////////////////////////////////////////////////////////////////
	//Other Accessors (get/set methods)
	////////////////////////////////////////////////////////////////////////////////


}